3.78 \(\int \sqrt {a+a \cos (c+d x)} (A+C \cos ^2(c+d x)) \sec (c+d x) \, dx\)

Optimal. Leaf size=96 \[ \frac {2 \sqrt {a} A \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a \cos (c+d x)+a}}\right )}{d}+\frac {2 C \sin (c+d x) \sqrt {a \cos (c+d x)+a}}{3 d}+\frac {2 a C \sin (c+d x)}{3 d \sqrt {a \cos (c+d x)+a}} \]

[Out]

2*A*arctanh(sin(d*x+c)*a^(1/2)/(a+a*cos(d*x+c))^(1/2))*a^(1/2)/d+2/3*a*C*sin(d*x+c)/d/(a+a*cos(d*x+c))^(1/2)+2
/3*C*sin(d*x+c)*(a+a*cos(d*x+c))^(1/2)/d

________________________________________________________________________________________

Rubi [A]  time = 0.26, antiderivative size = 96, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.121, Rules used = {3046, 2981, 2773, 206} \[ \frac {2 \sqrt {a} A \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a \cos (c+d x)+a}}\right )}{d}+\frac {2 C \sin (c+d x) \sqrt {a \cos (c+d x)+a}}{3 d}+\frac {2 a C \sin (c+d x)}{3 d \sqrt {a \cos (c+d x)+a}} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + a*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2)*Sec[c + d*x],x]

[Out]

(2*Sqrt[a]*A*ArcTanh[(Sqrt[a]*Sin[c + d*x])/Sqrt[a + a*Cos[c + d*x]]])/d + (2*a*C*Sin[c + d*x])/(3*d*Sqrt[a +
a*Cos[c + d*x]]) + (2*C*Sqrt[a + a*Cos[c + d*x]]*Sin[c + d*x])/(3*d)

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 2773

Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[(-2*
b)/f, Subst[Int[1/(b*c + a*d - d*x^2), x], x, (b*Cos[e + f*x])/Sqrt[a + b*Sin[e + f*x]]], x] /; FreeQ[{a, b, c
, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]

Rule 2981

Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.
) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(-2*b*B*Cos[e + f*x]*(c + d*Sin[e + f*x])^(n + 1))/(d*f*(2*n + 3)*Sqr
t[a + b*Sin[e + f*x]]), x] + Dist[(A*b*d*(2*n + 3) - B*(b*c - 2*a*d*(n + 1)))/(b*d*(2*n + 3)), Int[Sqrt[a + b*
Sin[e + f*x]]*(c + d*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] &&
EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] &&  !LtQ[n, -1]

Rule 3046

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (C_.)*
sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> -Simp[(C*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*(c + d*Sin[e + f*x])^(n
+ 1))/(d*f*(m + n + 2)), x] + Dist[1/(b*d*(m + n + 2)), Int[(a + b*Sin[e + f*x])^m*(c + d*Sin[e + f*x])^n*Simp
[A*b*d*(m + n + 2) + C*(a*c*m + b*d*(n + 1)) + C*(a*d*m - b*c*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b
, c, d, e, f, A, C, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] &&  !LtQ[m, -2^(-
1)] && NeQ[m + n + 2, 0]

Rubi steps

\begin {align*} \int \sqrt {a+a \cos (c+d x)} \left (A+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx &=\frac {2 C \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{3 d}+\frac {2 \int \sqrt {a+a \cos (c+d x)} \left (\frac {3 a A}{2}+\frac {1}{2} a C \cos (c+d x)\right ) \sec (c+d x) \, dx}{3 a}\\ &=\frac {2 a C \sin (c+d x)}{3 d \sqrt {a+a \cos (c+d x)}}+\frac {2 C \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{3 d}+A \int \sqrt {a+a \cos (c+d x)} \sec (c+d x) \, dx\\ &=\frac {2 a C \sin (c+d x)}{3 d \sqrt {a+a \cos (c+d x)}}+\frac {2 C \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{3 d}-\frac {(2 a A) \operatorname {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,-\frac {a \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{d}\\ &=\frac {2 \sqrt {a} A \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{d}+\frac {2 a C \sin (c+d x)}{3 d \sqrt {a+a \cos (c+d x)}}+\frac {2 C \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.14, size = 82, normalized size = 0.85 \[ \frac {\sec \left (\frac {1}{2} (c+d x)\right ) \sqrt {a (\cos (c+d x)+1)} \left (3 \sqrt {2} A \tanh ^{-1}\left (\sqrt {2} \sin \left (\frac {1}{2} (c+d x)\right )\right )+C \left (3 \sin \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {3}{2} (c+d x)\right )\right )\right )}{3 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + a*Cos[c + d*x]]*(A + C*Cos[c + d*x]^2)*Sec[c + d*x],x]

[Out]

(Sqrt[a*(1 + Cos[c + d*x])]*Sec[(c + d*x)/2]*(3*Sqrt[2]*A*ArcTanh[Sqrt[2]*Sin[(c + d*x)/2]] + C*(3*Sin[(c + d*
x)/2] + Sin[(3*(c + d*x))/2])))/(3*d)

________________________________________________________________________________________

fricas [A]  time = 1.02, size = 139, normalized size = 1.45 \[ \frac {3 \, {\left (A \cos \left (d x + c\right ) + A\right )} \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} - 4 \, \sqrt {a \cos \left (d x + c\right ) + a} \sqrt {a} {\left (\cos \left (d x + c\right ) - 2\right )} \sin \left (d x + c\right ) + 8 \, a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}}\right ) + 4 \, {\left (C \cos \left (d x + c\right ) + 2 \, C\right )} \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{6 \, {\left (d \cos \left (d x + c\right ) + d\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+C*cos(d*x+c)^2)*sec(d*x+c)*(a+a*cos(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

1/6*(3*(A*cos(d*x + c) + A)*sqrt(a)*log((a*cos(d*x + c)^3 - 7*a*cos(d*x + c)^2 - 4*sqrt(a*cos(d*x + c) + a)*sq
rt(a)*(cos(d*x + c) - 2)*sin(d*x + c) + 8*a)/(cos(d*x + c)^3 + cos(d*x + c)^2)) + 4*(C*cos(d*x + c) + 2*C)*sqr
t(a*cos(d*x + c) + a)*sin(d*x + c))/(d*cos(d*x + c) + d)

________________________________________________________________________________________

giac [B]  time = 45.06, size = 5325, normalized size = 55.47 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+C*cos(d*x+c)^2)*sec(d*x+c)*(a+a*cos(d*x+c))^(1/2),x, algorithm="giac")

[Out]

1/6*sqrt(2)*sqrt(a)*(3*sqrt(2)*(A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^3*tan(1/4*c)^6 - 6*A*sgn(cos(1/2*d*x +
1/2*c))*tan(1/2*c)^3*tan(1/4*c)^5 + 3*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^2*tan(1/4*c)^6 - 15*A*sgn(cos(1/2
*d*x + 1/2*c))*tan(1/2*c)^3*tan(1/4*c)^4 + 18*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^2*tan(1/4*c)^5 - 3*A*sgn(
cos(1/2*d*x + 1/2*c))*tan(1/2*c)*tan(1/4*c)^6 + 20*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^3*tan(1/4*c)^3 - 45*
A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^2*tan(1/4*c)^4 + 18*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)*tan(1/4*c)^5
 - A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*c)^6 + 15*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^3*tan(1/4*c)^2 - 60*A*
sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^2*tan(1/4*c)^3 + 45*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)*tan(1/4*c)^4 -
 6*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*c)^5 - 6*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^3*tan(1/4*c) + 45*A*sgn
(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^2*tan(1/4*c)^2 - 60*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)*tan(1/4*c)^3 + 15
*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*c)^4 - A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^3 + 18*A*sgn(cos(1/2*d*x +
1/2*c))*tan(1/2*c)^2*tan(1/4*c) - 45*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)*tan(1/4*c)^2 + 20*A*sgn(cos(1/2*d*
x + 1/2*c))*tan(1/4*c)^3 - 3*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^2 + 18*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2
*c)*tan(1/4*c) - 15*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*c)^2 + 3*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c) - 6*A*
sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*c) + A*sgn(cos(1/2*d*x + 1/2*c)))*log(abs(-2*tan(1/4*d*x + c)*tan(1/2*c)^3 +
 6*tan(1/4*d*x + c)*tan(1/2*c)^2 - 2*tan(1/2*c)^3 - 2*sqrt(2)*(tan(1/2*c)^2 + 1)^(3/2) + 6*tan(1/4*d*x + c)*ta
n(1/2*c) - 6*tan(1/2*c)^2 - 2*tan(1/4*d*x + c) + 6*tan(1/2*c) + 2)/abs(-2*tan(1/4*d*x + c)*tan(1/2*c)^3 + 6*ta
n(1/4*d*x + c)*tan(1/2*c)^2 - 2*tan(1/2*c)^3 + 2*sqrt(2)*(tan(1/2*c)^2 + 1)^(3/2) + 6*tan(1/4*d*x + c)*tan(1/2
*c) - 6*tan(1/2*c)^2 - 2*tan(1/4*d*x + c) + 6*tan(1/2*c) + 2))/((tan(1/4*c)^6 + 3*tan(1/4*c)^4 + 3*tan(1/4*c)^
2 + 1)*(tan(1/2*c)^2 + 1)^(3/2)) + 3*sqrt(2)*(A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^3*tan(1/4*c)^6 + 6*A*sgn(
cos(1/2*d*x + 1/2*c))*tan(1/2*c)^3*tan(1/4*c)^5 - 3*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^2*tan(1/4*c)^6 - 15
*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^3*tan(1/4*c)^4 + 18*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^2*tan(1/4*c
)^5 - 3*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)*tan(1/4*c)^6 - 20*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^3*tan(
1/4*c)^3 + 45*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^2*tan(1/4*c)^4 - 18*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c
)*tan(1/4*c)^5 + A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*c)^6 + 15*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^3*tan(1/
4*c)^2 - 60*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^2*tan(1/4*c)^3 + 45*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)*
tan(1/4*c)^4 - 6*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*c)^5 + 6*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^3*tan(1/4
*c) - 45*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^2*tan(1/4*c)^2 + 60*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)*tan
(1/4*c)^3 - 15*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*c)^4 - A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^3 + 18*A*sgn(
cos(1/2*d*x + 1/2*c))*tan(1/2*c)^2*tan(1/4*c) - 45*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)*tan(1/4*c)^2 + 20*A*
sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*c)^3 + 3*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^2 - 18*A*sgn(cos(1/2*d*x + 1
/2*c))*tan(1/2*c)*tan(1/4*c) + 15*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*c)^2 + 3*A*sgn(cos(1/2*d*x + 1/2*c))*tan
(1/2*c) - 6*A*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*c) - A*sgn(cos(1/2*d*x + 1/2*c)))*log(abs(-2*tan(1/4*d*x + c)*
tan(1/2*c)^3 - 6*tan(1/4*d*x + c)*tan(1/2*c)^2 + 2*tan(1/2*c)^3 - 2*sqrt(2)*(tan(1/2*c)^2 + 1)^(3/2) + 6*tan(1
/4*d*x + c)*tan(1/2*c) - 6*tan(1/2*c)^2 + 2*tan(1/4*d*x + c) - 6*tan(1/2*c) + 2)/abs(-2*tan(1/4*d*x + c)*tan(1
/2*c)^3 - 6*tan(1/4*d*x + c)*tan(1/2*c)^2 + 2*tan(1/2*c)^3 + 2*sqrt(2)*(tan(1/2*c)^2 + 1)^(3/2) + 6*tan(1/4*d*
x + c)*tan(1/2*c) - 6*tan(1/2*c)^2 + 2*tan(1/4*d*x + c) - 6*tan(1/2*c) + 2))/((tan(1/4*c)^6 + 3*tan(1/4*c)^4 +
 3*tan(1/4*c)^2 + 1)*(tan(1/2*c)^2 + 1)^(3/2)) + 8*(3*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^5*tan(1/2*c
)^6*tan(1/4*c)^6 - 45*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^5*tan(1/2*c)^6*tan(1/4*c)^4 + 18*C*sgn(cos(
1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^4*tan(1/2*c)^6*tan(1/4*c)^5 - 45*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x +
c)^5*tan(1/2*c)^4*tan(1/4*c)^6 + 36*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^4*tan(1/2*c)^5*tan(1/4*c)^6 -
 2*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^3*tan(1/2*c)^6*tan(1/4*c)^6 + 45*C*sgn(cos(1/2*d*x + 1/2*c))*t
an(1/4*d*x + c)^5*tan(1/2*c)^6*tan(1/4*c)^2 - 60*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^4*tan(1/2*c)^6*t
an(1/4*c)^3 + 675*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^5*tan(1/2*c)^4*tan(1/4*c)^4 - 540*C*sgn(cos(1/2
*d*x + 1/2*c))*tan(1/4*d*x + c)^4*tan(1/2*c)^5*tan(1/4*c)^4 + 30*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^
3*tan(1/2*c)^6*tan(1/4*c)^4 - 270*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^4*tan(1/2*c)^4*tan(1/4*c)^5 + 2
88*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^3*tan(1/2*c)^5*tan(1/4*c)^5 - 36*C*sgn(cos(1/2*d*x + 1/2*c))*t
an(1/4*d*x + c)^2*tan(1/2*c)^6*tan(1/4*c)^5 + 45*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^5*tan(1/2*c)^2*t
an(1/4*c)^6 - 120*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^4*tan(1/2*c)^3*tan(1/4*c)^6 + 30*C*sgn(cos(1/2*
d*x + 1/2*c))*tan(1/4*d*x + c)^3*tan(1/2*c)^4*tan(1/4*c)^6 + 3*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)*ta
n(1/2*c)^6*tan(1/4*c)^6 - 3*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^5*tan(1/2*c)^6 + 18*C*sgn(cos(1/2*d*x
 + 1/2*c))*tan(1/4*d*x + c)^4*tan(1/2*c)^6*tan(1/4*c) - 675*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^5*tan
(1/2*c)^4*tan(1/4*c)^2 + 540*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^4*tan(1/2*c)^5*tan(1/4*c)^2 - 30*C*s
gn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^3*tan(1/2*c)^6*tan(1/4*c)^2 + 900*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/
4*d*x + c)^4*tan(1/2*c)^4*tan(1/4*c)^3 - 960*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^3*tan(1/2*c)^5*tan(1
/4*c)^3 + 120*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^2*tan(1/2*c)^6*tan(1/4*c)^3 - 675*C*sgn(cos(1/2*d*x
 + 1/2*c))*tan(1/4*d*x + c)^5*tan(1/2*c)^2*tan(1/4*c)^4 + 1800*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^4*
tan(1/2*c)^3*tan(1/4*c)^4 - 450*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^3*tan(1/2*c)^4*tan(1/4*c)^4 - 45*
C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)*tan(1/2*c)^6*tan(1/4*c)^4 + 270*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1
/4*d*x + c)^4*tan(1/2*c)^2*tan(1/4*c)^5 - 960*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^3*tan(1/2*c)^3*tan(
1/4*c)^5 + 540*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^2*tan(1/2*c)^4*tan(1/4*c)^5 - 6*C*sgn(cos(1/2*d*x
+ 1/2*c))*tan(1/2*c)^6*tan(1/4*c)^5 - 3*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^5*tan(1/4*c)^6 + 36*C*sgn
(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^4*tan(1/2*c)*tan(1/4*c)^6 - 30*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x
 + c)^3*tan(1/2*c)^2*tan(1/4*c)^6 - 45*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)*tan(1/2*c)^4*tan(1/4*c)^6
+ 12*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^5*tan(1/4*c)^6 + 45*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^5
*tan(1/2*c)^4 - 36*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^4*tan(1/2*c)^5 + 2*C*sgn(cos(1/2*d*x + 1/2*c))
*tan(1/4*d*x + c)^3*tan(1/2*c)^6 - 270*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^4*tan(1/2*c)^4*tan(1/4*c)
+ 288*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^3*tan(1/2*c)^5*tan(1/4*c) - 36*C*sgn(cos(1/2*d*x + 1/2*c))*
tan(1/4*d*x + c)^2*tan(1/2*c)^6*tan(1/4*c) + 675*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^5*tan(1/2*c)^2*t
an(1/4*c)^2 - 1800*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^4*tan(1/2*c)^3*tan(1/4*c)^2 + 450*C*sgn(cos(1/
2*d*x + 1/2*c))*tan(1/4*d*x + c)^3*tan(1/2*c)^4*tan(1/4*c)^2 + 45*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)
*tan(1/2*c)^6*tan(1/4*c)^2 - 900*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^4*tan(1/2*c)^2*tan(1/4*c)^3 + 32
00*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^3*tan(1/2*c)^3*tan(1/4*c)^3 - 1800*C*sgn(cos(1/2*d*x + 1/2*c))
*tan(1/4*d*x + c)^2*tan(1/2*c)^4*tan(1/4*c)^3 + 20*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^6*tan(1/4*c)^3 + 45*
C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^5*tan(1/4*c)^4 - 540*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)
^4*tan(1/2*c)*tan(1/4*c)^4 + 450*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^3*tan(1/2*c)^2*tan(1/4*c)^4 + 67
5*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)*tan(1/2*c)^4*tan(1/4*c)^4 - 180*C*sgn(cos(1/2*d*x + 1/2*c))*tan
(1/2*c)^5*tan(1/4*c)^4 - 18*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^4*tan(1/4*c)^5 + 288*C*sgn(cos(1/2*d*
x + 1/2*c))*tan(1/4*d*x + c)^3*tan(1/2*c)*tan(1/4*c)^5 - 540*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^2*ta
n(1/2*c)^2*tan(1/4*c)^5 + 90*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^4*tan(1/4*c)^5 + 2*C*sgn(cos(1/2*d*x + 1/2
*c))*tan(1/4*d*x + c)^3*tan(1/4*c)^6 + 45*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)*tan(1/2*c)^2*tan(1/4*c)
^6 - 40*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^3*tan(1/4*c)^6 - 45*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c
)^5*tan(1/2*c)^2 + 120*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^4*tan(1/2*c)^3 - 30*C*sgn(cos(1/2*d*x + 1/
2*c))*tan(1/4*d*x + c)^3*tan(1/2*c)^4 - 3*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)*tan(1/2*c)^6 + 270*C*sg
n(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^4*tan(1/2*c)^2*tan(1/4*c) - 960*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d
*x + c)^3*tan(1/2*c)^3*tan(1/4*c) + 540*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^2*tan(1/2*c)^4*tan(1/4*c)
 - 6*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^6*tan(1/4*c) - 45*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^5*t
an(1/4*c)^2 + 540*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^4*tan(1/2*c)*tan(1/4*c)^2 - 450*C*sgn(cos(1/2*d
*x + 1/2*c))*tan(1/4*d*x + c)^3*tan(1/2*c)^2*tan(1/4*c)^2 - 675*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)*t
an(1/2*c)^4*tan(1/4*c)^2 + 180*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^5*tan(1/4*c)^2 + 60*C*sgn(cos(1/2*d*x +
1/2*c))*tan(1/4*d*x + c)^4*tan(1/4*c)^3 - 960*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^3*tan(1/2*c)*tan(1/
4*c)^3 + 1800*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^2*tan(1/2*c)^2*tan(1/4*c)^3 - 300*C*sgn(cos(1/2*d*x
 + 1/2*c))*tan(1/2*c)^4*tan(1/4*c)^3 - 30*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^3*tan(1/4*c)^4 - 675*C*
sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)*tan(1/2*c)^2*tan(1/4*c)^4 + 600*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2
*c)^3*tan(1/4*c)^4 + 36*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^2*tan(1/4*c)^5 - 90*C*sgn(cos(1/2*d*x + 1
/2*c))*tan(1/2*c)^2*tan(1/4*c)^5 - 3*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)*tan(1/4*c)^6 + 12*C*sgn(cos(
1/2*d*x + 1/2*c))*tan(1/2*c)*tan(1/4*c)^6 + 3*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^5 - 36*C*sgn(cos(1/
2*d*x + 1/2*c))*tan(1/4*d*x + c)^4*tan(1/2*c) + 30*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^3*tan(1/2*c)^2
 + 45*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)*tan(1/2*c)^4 - 12*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^5
- 18*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^4*tan(1/4*c) + 288*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x +
 c)^3*tan(1/2*c)*tan(1/4*c) - 540*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^2*tan(1/2*c)^2*tan(1/4*c) + 90*
C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^4*tan(1/4*c) + 30*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^3*tan(1/
4*c)^2 + 675*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)*tan(1/2*c)^2*tan(1/4*c)^2 - 600*C*sgn(cos(1/2*d*x +
1/2*c))*tan(1/2*c)^3*tan(1/4*c)^2 - 120*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^2*tan(1/4*c)^3 + 300*C*sg
n(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^2*tan(1/4*c)^3 + 45*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)*tan(1/4*c)
^4 - 180*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)*tan(1/4*c)^4 + 6*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*c)^5 - 2*
C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^3 - 45*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)*tan(1/2*c)^2
+ 40*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^3 + 36*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)^2*tan(1/4*c) -
 90*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)^2*tan(1/4*c) - 45*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c)*tan(
1/4*c)^2 + 180*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c)*tan(1/4*c)^2 - 20*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*c)
^3 + 3*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/4*d*x + c) - 12*C*sgn(cos(1/2*d*x + 1/2*c))*tan(1/2*c) + 6*C*sgn(cos(
1/2*d*x + 1/2*c))*tan(1/4*c))/((tan(1/2*c)^6*tan(1/4*c)^6 + 3*tan(1/2*c)^6*tan(1/4*c)^4 + 3*tan(1/2*c)^4*tan(1
/4*c)^6 + 3*tan(1/2*c)^6*tan(1/4*c)^2 + 9*tan(1/2*c)^4*tan(1/4*c)^4 + 3*tan(1/2*c)^2*tan(1/4*c)^6 + tan(1/2*c)
^6 + 9*tan(1/2*c)^4*tan(1/4*c)^2 + 9*tan(1/2*c)^2*tan(1/4*c)^4 + tan(1/4*c)^6 + 3*tan(1/2*c)^4 + 9*tan(1/2*c)^
2*tan(1/4*c)^2 + 3*tan(1/4*c)^4 + 3*tan(1/2*c)^2 + 3*tan(1/4*c)^2 + 1)*(tan(1/4*d*x + c)^2 + 1)^3))/d

________________________________________________________________________________________

maple [B]  time = 1.81, size = 248, normalized size = 2.58 \[ \frac {\cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (-4 C \sqrt {a}\, \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+3 A \ln \left (-\frac {4 \left (\sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}-a \sqrt {2}\, \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+2 a \right )}{-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {2}}\right ) a +3 A \ln \left (\frac {4 \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}+4 a \sqrt {2}\, \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+8 a}{2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {2}}\right ) a +6 C \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\right )}{3 \sqrt {a}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {a \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+C*cos(d*x+c)^2)*sec(d*x+c)*(a+a*cos(d*x+c))^(1/2),x)

[Out]

1/3/a^(1/2)*cos(1/2*d*x+1/2*c)*(a*sin(1/2*d*x+1/2*c)^2)^(1/2)*(-4*C*a^(1/2)*2^(1/2)*(a*sin(1/2*d*x+1/2*c)^2)^(
1/2)*sin(1/2*d*x+1/2*c)^2+3*A*ln(-4/(-2*cos(1/2*d*x+1/2*c)+2^(1/2))*(2^(1/2)*(a*sin(1/2*d*x+1/2*c)^2)^(1/2)*a^
(1/2)-a*2^(1/2)*cos(1/2*d*x+1/2*c)+2*a))*a+3*A*ln(4/(2*cos(1/2*d*x+1/2*c)+2^(1/2))*(2^(1/2)*(a*sin(1/2*d*x+1/2
*c)^2)^(1/2)*a^(1/2)+a*2^(1/2)*cos(1/2*d*x+1/2*c)+2*a))*a+6*C*2^(1/2)*(a*sin(1/2*d*x+1/2*c)^2)^(1/2)*a^(1/2))/
sin(1/2*d*x+1/2*c)/(a*cos(1/2*d*x+1/2*c)^2)^(1/2)/d

________________________________________________________________________________________

maxima [A]  time = 0.51, size = 37, normalized size = 0.39 \[ \frac {{\left (\sqrt {2} \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 3 \, \sqrt {2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} C \sqrt {a}}{3 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+C*cos(d*x+c)^2)*sec(d*x+c)*(a+a*cos(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

1/3*(sqrt(2)*sin(3/2*d*x + 3/2*c) + 3*sqrt(2)*sin(1/2*d*x + 1/2*c))*C*sqrt(a)/d

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\left (C\,{\cos \left (c+d\,x\right )}^2+A\right )\,\sqrt {a+a\,\cos \left (c+d\,x\right )}}{\cos \left (c+d\,x\right )} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + C*cos(c + d*x)^2)*(a + a*cos(c + d*x))^(1/2))/cos(c + d*x),x)

[Out]

int(((A + C*cos(c + d*x)^2)*(a + a*cos(c + d*x))^(1/2))/cos(c + d*x), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a \left (\cos {\left (c + d x \right )} + 1\right )} \left (A + C \cos ^{2}{\left (c + d x \right )}\right ) \sec {\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+C*cos(d*x+c)**2)*sec(d*x+c)*(a+a*cos(d*x+c))**(1/2),x)

[Out]

Integral(sqrt(a*(cos(c + d*x) + 1))*(A + C*cos(c + d*x)**2)*sec(c + d*x), x)

________________________________________________________________________________________